package com.sgb.goods.entity;

import com.contrarywind.interfaces.IPickerViewData;
import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * 描述：商品属性实体类
 *
 * @author qiangHeNoo
 * <p>
 * 时间：2021.12.06
 */
public class AttributeViewEntity {
    /**
     * name : 计量方式
     * id : 2
     * isFill 属性是否必填 0  否  1 是
     * type : [{"cname":"过磅","cid":"3"},{"cname":"检尺","cid":"2783"}]
     */
    @SerializedName("name")
    private String name;
    @SerializedName("id")
    private String id;
    @SerializedName("isFill")
    private int isFill;
    @SerializedName("type")
    private List<TypeBean> type;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getIsFill() {
        return isFill;
    }

    public void setIsFill(int isFill) {
        this.isFill = isFill;
    }

    public List<TypeBean> getType() {
        return type;
    }

    public void setType(List<TypeBean> type) {
        this.type = type;
    }

    public static class TypeBean implements IPickerViewData {
        /**
         * cname : 过磅
         * cid : 3
         */
        @SerializedName("cname")
        private String cname;
        @SerializedName("cid")
        private String cid;
        private boolean isSelected;

        public String getCname() {
            return cname;
        }

        public void setCname(String cname) {
            this.cname = cname;
        }

        public String getCid() {
            return cid;
        }

        public void setCid(String cid) {
            this.cid = cid;
        }

        @Override
        public String getPickerViewText() {
            return cname;
        }

        public boolean isSelected() {
            return isSelected;
        }

        public void setSelected(boolean selected) {
            isSelected = selected;
        }
    }

}
